package com.evildog.workspace.life.application.convert;

import com.evildog.workspace.common.result.PagedResult;
import java.util.List;
import com.evildog.workspace.life.application.vo.NoteBookPageVO;
import com.evildog.workspace.life.application.vo.NoteBookListVO;
import com.evildog.workspace.life.application.vo.NoteBookVO;
import com.evildog.workspace.life.application.dto.NoteBookPageDTO;
import com.evildog.workspace.life.application.dto.NoteBookListDTO;
import com.evildog.workspace.life.application.dto.NoteBookDTO;
import com.evildog.workspace.life.application.model.NoteBookParam;
import com.evildog.workspace.life.application.model.NoteBookPageParam;
import com.evildog.workspace.life.application.model.NoteBookListParam;
import com.evildog.workspace.life.application.bo.NoteBookBO;
import com.evildog.workspace.life.application.bo.NoteBookPageBO;
import com.evildog.workspace.life.application.bo.NoteBookListBO;
import com.evildog.workspace.life.application.entity.NoteBook;
import com.evildog.workspace.life.application.entity.NoteBookPageDO;
import com.evildog.workspace.life.application.entity.NoteBookListDO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface NoteBookConvert {

    NoteBookConvert INSTANCE = Mappers.getMapper(NoteBookConvert.class);

    NoteBookPageDTO convert(NoteBookPageParam noteBookPageParam);

    NoteBookListDTO convert(NoteBookListParam noteBookListParam);

    NoteBookDTO convert(NoteBookParam noteBookParam);

    @Mapping(target = "isDeleted", ignore = true)
    NoteBook convert(NoteBookDTO noteBookDTO);

    NoteBookPageDO convert(NoteBookPageDTO noteBookPageDTO);

    NoteBookVO convert(NoteBookBO noteBookBO);

    NoteBookBO convert(NoteBook noteBook);

    List<NoteBookListBO> convert(List<NoteBookListDO> noteBookList);

    List<NoteBookListVO> convertVoList(List<NoteBookListBO> noteBookListBO);

    @Mappings({})
    PagedResult<NoteBookPageBO> convert(IPage<NoteBookPageDO> page);

    PagedResult<NoteBookPageVO> convert(PagedResult<NoteBookPageBO> page);
}